with open('testmysql.py') as f:    print(next(f))  # cur    print(next(f))